﻿/*RegisterPage*/
ADS.addEvent(window, 'load', registPage);
function registPage() {
    var input = ADS.getElementByClassName('regist_input', 'input');
    ADS.addEvent(ADS.$('submit'), 'click', function (W3CEvent) {
        if (ADS.$('checkTerm').checked == false) {
            alert('Pls read the TERMs OF USE');
            ADS.preventDefault(W3CEvent);
        }
        else {
            for (var j = 0; j < input.length; j++) {
                if (input[j].value == '') {
                    input[j].focus();
                    ADS.preventDefault(W3CEvent);
                    alert('Pls Finish Your Input!');

                    break;
                }
            }
        }
    });
    ADS.addEvent(ADS.$('reset'), 'click', function (W3CEvent) {
        for (var k = 0; k < input.length; k++) {
            input[k].value = '';
            ADS.preventDefault(W3CEvent);
        }
    });
}

/*---Error Page----*/
